Skip to content

Use sdk paths! #62619

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Aug 22, 2025
Merged

Use sdk paths! #62619

merged 7 commits into from
Aug 22, 2025

Conversation

BrennanConroy
Copy link
Member

@BrennanConroy BrennanConroy commented Jul 8, 2025

Small local development improvement. When building on the command line you no longer need to "activate" and we'll automatically look in the .dotnet/ folder.
dotnet/runtime#113512

Sadly VS doesn't seem to work yet, it grabs the right SDK, but doesn't seem to look at the same folder for runtimes yet. See dotnet/sdk#49363

@BrennanConroy BrennanConroy requested review from wtgodbe and a team as code owners July 8, 2025 23:06
@github-actions github-actions bot added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Jul 8, 2025
@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Jul 16, 2025
@BrennanConroy BrennanConroy removed the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Jul 22, 2025
@BrennanConroy BrennanConroy enabled auto-merge (squash) July 22, 2025 21:26
@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Jul 30, 2025
@captainsafia
Copy link
Member

/azp run

@dotnet-policy-service dotnet-policy-service bot removed the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Aug 10, 2025
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@captainsafia
Copy link
Member

It looks like this might be blocked because it breaks the Blazor template tests. Do we have a path forward here?

cc: @ilonatommy

@ilonatommy
Copy link
Member

/azp run

Copy link

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@Copilot Copilot AI review requested due to automatic review settings August 21, 2025 08:20
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds SDK path configuration to improve local development by automatically looking for the .NET SDK in the local .dotnet/ folder, eliminating the need to manually activate the environment when building from the command line.

Key changes:

  • Added SDK path resolution to check local .dotnet folder first before falling back to host SDK
  • Added a helpful error message when the SDK cannot be found

"version": "10.0.100-rc.1.25411.109"
"version": "10.0.100-rc.1.25411.109",
"paths": [ ".dotnet", "$host$" ],
"errorMessage": "The .NET SDK could not be found, run ./restore.cmd or ./restore.sh first."
Copy link
Preview

Copilot AI Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message references './restore.cmd' and './restore.sh' scripts, but based on the coding guidelines, the repository uses './build.sh' scripts in subdirectories for building and running tests. Consider updating the error message to reference the correct scripts or provide more accurate guidance.

Suggested change
"errorMessage": "The .NET SDK could not be found, run ./restore.cmd or ./restore.sh first."
"errorMessage": "The .NET SDK could not be found. Please run ./build.sh (or ./build.cmd on Windows) in the appropriate subdirectory first."

Copilot uses AI. Check for mistakes.

@BrennanConroy BrennanConroy merged commit 9f2977b into main Aug 22, 2025
29 checks passed
@BrennanConroy BrennanConroy deleted the brecon/paths branch August 22, 2025 14:51
@dotnet-policy-service dotnet-policy-service bot added this to the 11.0-preview1 milestone Aug 22, 2025
@ilonatommy
Copy link
Member

I'm sorry @BrennanConroy, I did not mean to merge it yet, we can make it cleaner, without 2 global.json, following your initial approach with updating PrepareForTest.targets. Let me make a follow-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants